home *** CD-ROM | disk | FTP | other *** search
/ Amiga Tools 5 / Amiga Tools 5.iso / tools / dfÜ / bbs / aptbbs1 / apt / rexx / bumpfilelists.rexx < prev    next >
Encoding:
OS/2 REXX Batch file  |  1995-10-10  |  3.9 KB  |  137 lines

  1. /* BumpFileLists.rexx
  2. **
  3. ** $VER: bumpfilelists 0.0.1 (01.9.93)
  4. **
  5. ** ARexx program for controlling ApT-BBS by ApT-Design.
  6. **
  7. ** Copyright © 1993 ApT-Design All Rights Reserved,AG.
  8. **
  9. ** Updates both the FRQUEST lists, as well as the file lists
  10. ** used for download by the user while online.
  11. */
  12.  
  13. CR = 'A'x
  14. parse arg lineno
  15.  
  16. options results
  17. portname = 'APTMANAGER'
  18. address value portname
  19.  
  20. say CR CR "Bumping file lists & updating freq lists.." CR
  21.  
  22. /*
  23. ** Some defines that we will be using, ... change according
  24. ** to your system.
  25. **/
  26. WorkDir  = "T:"
  27. DestDir  = "FLIST:"
  28. FreqFile = "FILES.TXT"
  29. FreqArc  = "FILES.LHA"
  30. Header   = "Mail:QSilver/QSilver.Header"
  31.  
  32. RecentFile    = "RECENT.TXT"
  33. RecentArc     = "RECENT.LHA"
  34. RecentHeader= "Mail:QSilver/QSilver.Header"
  35.  
  36. /*
  37. ** Included is a list of all of the areas that I am
  38. ** allowing to be included within the list.
  39. **
  40. ** You can even arrange the order that they should be
  41. ** listed with a little bit of thought..
  42. **
  43. ** For some people they would require a few INCLUDE
  44. ** tokens (but different) so that they could archive
  45. ** things such as related 'FOOBETA.LHA' for products
  46. ** that you may be producing/supporting etc..
  47. **
  48. **        BaseNumber
  49. **        ---------
  50. */
  51. INCLUDE.1    = 0    /* Pictures            */
  52. INCLUDE.2     = 2    /* Odds&Sods            */
  53. INCLUDE.3     = 3    /* Amiga Music            */
  54. INCLUDE.4     = 4    /* Amiga Comms            */
  55. INCLUDE.5     = 5    /* Amiga Demos            */
  56. INCLUDE.6     = 6    /* Amiga Games            */
  57. INCLUDE.7     = 7    /* Amiga General        */
  58. INCLUDE.8     = 8    /* Amiga Programming        */
  59. INCLUDE.9     = 9    /* Amiga Utility        */
  60. INCLUDE.10     = 10    /* Amiga Pictures        */
  61. INCLUDE.11     = 11    /* Amiga Text            */
  62. INCLUDE.12    = 12    /* Amiga BBS            */
  63. INCLUDE.13    = 13    /* Arexx            */
  64. INCLUDE.14    = 14    /* Amiga Usenet            */
  65. INCLUDE.15    = 18    /* Amiga BBS CLI        */
  66. INCLUDE.16    = 19    /* Amiga Emulators        */
  67. INCLUDE.17    = 30    /* AGA Only            */
  68. INCLUDE.18    = 31    /* CD32 General            */
  69. INCLUDE.19    = 20    /* IBM General            */
  70. INCLUDE.20    = 21    /* IBM Animation        */
  71. INCLUDE.21     = 22    /* IBM Comms            */
  72. INCLUDE.22    = 23    /* IBM Games            */
  73. INCLUDE.23    = 24    /* IBM Pics            */
  74. INCLUDE.24    = 25    /* IBM Utilities        */
  75. Limit = 25
  76.  
  77. /*
  78. ** Its nice to have a header/advert at the top of your FREQ list
  79. ** explaining something about the magic names etc..
  80. ** Depending on the 'freqhandler' used you may not require to
  81. ** include one yourself, rather the 'freqhandler' would do that
  82. ** for you - Here we use our own custom generated one and attach
  83. ** it ourselves.
  84. **/
  85. address command "Copy "Header" to "WorkDir||FreqFile
  86. address command "Copy "RecentHeader" to "WorkDir||RecentFile
  87.  
  88. /*
  89. ** We now do the actual creating of the FREQuest
  90. ** listings, only the areas defined within the INCLUDE
  91. ** list will be included.
  92. **/
  93. 'FREQLIST' "OPEN="WorkDir||FreqFile
  94. DO Pos=1 WHILE Pos < Limit ; 'FREQLIST' "BASE "INCLUDE.Pos ; END
  95. 'FREQLIST' "CLOSE"
  96.  
  97. 'FREQLIST' "OPEN="WorkDir||RecentFile" DAYS=30"
  98. DO Pos=1 WHILE Pos < Limit ; 'FREQLIST' "BASE "INCLUDE.Pos ; END
  99. 'FREQLIST' "CLOSE"
  100.  
  101. /*
  102. ** Create the FILES.LHA file in the work directory.
  103. ** Once created we move it over to our destination directory
  104. ** and remove the existing .LHA file in the work dir.
  105. **/
  106. address command "lha a "WorkDir||FreqArc WorkDir||FreqFile
  107. address command "Copy "WorkDir||FreqArc "to "DestDir||FreqArc
  108. address command "Delete "WorkDir||FreqArc
  109.  
  110. address command "lha a "WorkDir||RecentArc WorkDir||RecentFile
  111. address command "Copy "WorkDir||RecentArc "to "DestDir||RecentArc
  112. address command "Delete "WorkDir||RecentArc
  113.  
  114. /*
  115. ** Copy the .TXT file over to our destination dir and then
  116. ** remove it from the work dir.
  117. **/
  118. address command "Copy "WorkDir||FreqFile "to "DestDir||FreqFile
  119. address command "Delete "WorkDir||FreqFile
  120.  
  121. address command "Copy "WorkDir||RecentFile "to "DestDir||RecentFile
  122. address command "Delete "WorkDir||RecentFile
  123.  
  124. /*
  125. ** Now bump ALL of the file areas with new filelists to be placed
  126. ** within the FLIST: directory.
  127. **/
  128.  
  129. 'BUMPFILELISTS' "DAYS=14"
  130.  
  131. say CR "Finished...."
  132.  
  133. EXIT
  134.  
  135. /*##########################################################################*/
  136.  
  137.